﻿namespace GerbilLib
{
    /// <summary>
    /// Provides options for cover image display and download. Used by the Preferences class.
    /// </summary>
    public class CoverImageOptions
    {
        #region .   Public Properties   .
        /// <summary>
        /// List of all supported cover image sources
        /// </summary>
        public enum CoverImageSources { IMDb, TMDb }

        /// <summary>
        /// Gets or sets the cover image source.
        /// </summary>
        /// <value>
        /// The cover image source.
        /// </value>
        public CoverImageSources CoverImageSource { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether to show the image picker dialog if there is only one image available.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if image picker should always be shown; otherwise, <c>false</c>.
        /// </value>
        public bool AlwaysShowImagePicker { get; set; }
        /// <summary>
        /// Gets or sets the size of the cover image preview.
        /// </summary>
        /// <value>
        /// The size of the cover image preview.
        /// </value>
        public TmdbImage.ImageSize CoverImagePreviewSize { get; set; }
        /// <summary>
        /// Gets or sets the default size of the cover image when downloading.
        /// </summary>
        /// <value>
        /// The default size of the cover image when downloading.
        /// </value>
        public TmdbImage.ImageSize CoverImageDefaultSize { get; set; }
        /// <summary>
        /// Gets or sets the size of the backdrop image preview.
        /// </summary>
        /// <value>
        /// The size of the backdrop image preview.
        /// </value>
        public TmdbImage.ImageSize BackdropImagePreviewSize { get; set; }
        /// <summary>
        /// Gets or sets the default size of the backdrop image when downloading.
        /// </summary>
        /// <value>
        /// The default size of the backdrop image when downloading.
        /// </value>
        public TmdbImage.ImageSize BackdropImageDefaultSize { get; set; }
        #endregion

        #region .   Constructors   .
        /// <summary>
        /// Initializes a new instance of the <see cref="CoverImageOptions"/> class.
        /// </summary>
        public CoverImageOptions()
        {
            // Empty constructor for Xml Serialization
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="CoverImageOptions"/> class.
        /// </summary>
        /// <param name="coverImageSource">The cover image source.</param>
        /// <param name="alwaysShowImagePicker">If set to <c>true</c> always show image picker dialog.</param>
        /// <param name="coverImagePreviewSize">Size of the cover image preview.</param>
        /// <param name="coverImageDefaultSize">Default size of the cover image.</param>
        /// <param name="backdropImagePreviewSize">Size of the backdrop image preview.</param>
        /// <param name="backdropImageDefaultSize">Default size of the backdrop image.</param>
        public CoverImageOptions(CoverImageSources coverImageSource, bool alwaysShowImagePicker, TmdbImage.ImageSize coverImagePreviewSize, TmdbImage.ImageSize coverImageDefaultSize, TmdbImage.ImageSize backdropImagePreviewSize, TmdbImage.ImageSize backdropImageDefaultSize)
        {
            CoverImageSource = coverImageSource;
            AlwaysShowImagePicker = alwaysShowImagePicker;
            CoverImagePreviewSize = coverImagePreviewSize;
            CoverImageDefaultSize = coverImageDefaultSize;
            BackdropImagePreviewSize = backdropImagePreviewSize;
            BackdropImageDefaultSize = backdropImageDefaultSize;
        }
        #endregion
    }
}
